package com.purchase.ml.entity.prod;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_product_sku")
@ApiModel(value = "SysProductSku", description = "商品sku表")
public class SysProductSku implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /**
     * 产品ID
     */
    @TableField(value = "product_id")
    @ApiModelProperty(value = "产品ID")
    private Long productId;

    /**
     * SKU描述
     */
    @TableField(value = "sku_describe")
    @ApiModelProperty(value = "SKU描述")
    private String skuDescribe;

    /**
     * 最小起量
     */
    @TableField(value = "moq")
    @ApiModelProperty(value = "最小起量")
    private Integer moq;

    /**
     * 出货天数
     */
    @TableField(value = "delivery_day")
    @ApiModelProperty(value = "出货天数")
    private Integer deliveryDay;

    /**
     * 长
     */
    @TableField(value = "weight")
    @ApiModelProperty(value = "长")
    private Integer weight;

    /**
     * 宽
     */
    @TableField(value = "length")
    @ApiModelProperty(value = "宽")
    private Integer length;

    /**
     * 高
     */
    @TableField(value = "height")
    @ApiModelProperty(value = "高")
    private Integer height;

    /**
     * 宽度
     */
    @TableField(value = "width")
    @ApiModelProperty(value = "宽度")
    private Integer width;

    /**
     * 单位
     */
    @TableField(value = "unit")
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 库存
     */
    @TableField(value = "stock")
    @ApiModelProperty(value = "库存")
    private Integer stock;

    @TableField(value = "master_unit")
    @ApiModelProperty(value = "主经销商出售单位:如bottle(瓶)")
    private String masterUnit;

    @TableField(value = "exchange_num")
    @ApiModelProperty(value = "兑换数量：如1箱24瓶  exchange_num=24")
    @NotNull(message = "MOQ tidak boleh kosong")
    private Integer exchangeNum;

    private static final long serialVersionUID = 1L;
}